<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
description("Verify that an aborted and stopping FileReader doesn't crash");

window.jsTestIsAsync = true;

if (window.testRunner)
    testRunner.dumpAsText();

var reader;
function setReader(r) {
    reader = r;
}

function runTest() {
    reader.readAsText(new Blob());
    reader.abort();
    document.body.removeChild(document.getElementById('ifr'));
    reader = null;
    gc();
    testPassed("No crash");
    finishJSTest();
}
</script>
<iframe id=ifr src="resources/file-reader-abort-gc-iframe.html"></iframe>
